<nz-modal [(nzVisible)]="isVisible"
          [nzWidth]="560" nzTitle="注册运营账号"
          (nzOnCancel)="handleCancel()"
          (nzOnOk)="handleOk()"
          [nzOkLoading]="isOkLoading"
>
<!--  <nz-spin [nzSpinning]="isSpinning">-->
    <form nz-form [formGroup]="formModel">
        <nz-form-item>
          <nz-form-label [nzSpan]="5" nzRequired nzFor="mobile">手机号码</nz-form-label>
          <nz-form-control [nzSm]="15" nzHasFeedback nzValidatingTip="验证中..." [nzXs]="24" [nzErrorTip]="mobileErrorTp">
            <input nz-input type="number" formControlName="mobile"  placeholder="请输入手机号码"/>
            <ng-template #mobileErrorTp let-control>
              <ng-container *ngIf="control.hasError('required')">
                请输入用户手机号!
              </ng-container>
              <ng-container *ngIf="control.hasError('mobile1')">
                请输入正确的手机号码!
              </ng-container>
              <ng-container *ngIf="control.hasError('duplicated')">
                该手机号码已存在!
              </ng-container>
            </ng-template>
          </nz-form-control>
        </nz-form-item>

      <nz-form-item>
        <nz-form-label [nzSpan]="5" nzRequired nzFor="mobile">负责人姓名</nz-form-label>
        <nz-form-control [nzSm]="15"  [nzXs]="24"  nzErrorTip="请输入负责人姓名">
          <input nz-input  formControlName="name"  placeholder="请输入负责人姓名"/>
        </nz-form-control>
      </nz-form-item>



        <nz-form-item>
          <nz-form-label [nzSpan]="5" nzRequired>账号密码</nz-form-label>
          <nz-form-control [nzSpan]="15" nzErrorTip="请输入用户密码！" [nzErrorTip]="passwordErrorTpl">
            <input nz-input type="password" formControlName="password" placeholder="请输入账号密码" readonly
                   onfocus="this.removeAttribute('readonly')"/>
            <ng-template #passwordErrorTpl let-control>
              <ng-container *ngIf="control.hasError('required')">
                请输入用户登录密码!
              </ng-container>
              <ng-container *ngIf="control.hasError('duplicated')">
                密码最小长度为6!
              </ng-container>
            </ng-template>
          </nz-form-control>
        </nz-form-item>

      <nz-form-item>
        <nz-form-label [nzSpan]="5" nzRequired>验证码</nz-form-label>
        <nz-form-control [nzSpan]="15" nzErrorTip="请输入验证码！" >
          <div nz-row [nzGutter]="8">
            <div nz-col [nzSpan]="16">
              <input nz-input type="smsCode" formControlName="smsCode" placeholder="请输入验证码"/>
            </div>
            <div nz-col [nzSpan]="6">
              <button nz-button (click)="sendCode()"  [nzLoading]="isLoadingOne" nzType="primary">{{smsCodeText}}</button>
            </div>
          </div>

        </nz-form-control>
      </nz-form-item>
    </form>
<!--  </nz-spin>-->
</nz-modal>
